import store from "./store";
import router from "./router";
router.beforeEach((to,from,next)=>{
    let authList=["/user/profile"]
    if (authList.includes(to.path)) {
        if (store.state.user) {
            next()
        }
        else{
            next("/login?url="+to.path)
        }
    } else{
        next()
    }
})